package com.party.core.model.mall;

/**
 * 展示商品
 * Created by wei.li
 *
 * @date 2017/8/24 0024
 * @time 15:08
 */
public class MallShowGoodsWithCategory extends MallShowGoods{

    private static final long serialVersionUID = -9209186666776635851L;

    //分类名称
    private String categoryName;

    //分类id
    private String categoryId;

    // 分类图片
    private String categoryPic;

    public String getCategoryName() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }

    @Override
    public String getCategoryId() {
        return categoryId;
    }

    @Override
    public void setCategoryId(String categoryId) {
        this.categoryId = categoryId;
    }

    public String getCategoryPic() {
        return categoryPic;
    }

    public void setCategoryPic(String categoryPic) {
        this.categoryPic = categoryPic;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof MallShowGoodsWithCategory)) return false;
        if (!super.equals(o)) return false;

        MallShowGoodsWithCategory that = (MallShowGoodsWithCategory) o;

        if (categoryName != null ? !categoryName.equals(that.categoryName) : that.categoryName != null) return false;
        if (categoryId != null ? !categoryId.equals(that.categoryId) : that.categoryId != null) return false;
        return categoryPic != null ? categoryPic.equals(that.categoryPic) : that.categoryPic == null;
    }

    @Override
    public int hashCode() {
        int result = super.hashCode();
        result = 31 * result + (categoryName != null ? categoryName.hashCode() : 0);
        result = 31 * result + (categoryId != null ? categoryId.hashCode() : 0);
        result = 31 * result + (categoryPic != null ? categoryPic.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "MallShowGoodsWithCategory{" +
                "categoryName='" + categoryName + '\'' +
                ", categoryId='" + categoryId + '\'' +
                ", categoryPic='" + categoryPic + '\'' +
                '}';
    }
}
